package com.healthbox.appointmentservice.mapper;

import com.healthbox.appointmentservice.entity.Hospital;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author pengpeng
 * @date 2022/5/11
 */
@Mapper
public interface HospitalMapper {
    int save(Hospital hospital);

    Hospital findOneByHospitalId(Long hospitalId);

    int update(Hospital hospital);

    int delete(Long hospitalId);

    List<Hospital> findByNameAndPhone(String name, String phone);

    Integer saveBatch(List<Hospital> list);

    /**
     * 危险：这个方法这是用来测试时使用，不要对外暴露，要不就真要跑路了。
     */
    void truncate();

}
